/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author XPF
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface ExercisePrescription extends BasicModel<ExercisePrescription> {
  prescriptionId?: string; // 处方主键
  prescriptionName?: string; // 处方名称
  prescriptionType?: string; // 处方分类＂有氧耐力、上肢力量、反应速度＂
  adaptGrade?: string; // 适配年级
  playbackVolume?: string; // 播放量
  sort?: string; // 排序
  prescriptionVideoPath?: string; // 处方视频路径
  prescriptionExplanation?: string; // 处方讲解（动作要领）
  uploadTime?: string; // 上传时间
}

export const exercisePrescriptionList = (params?: ExercisePrescription | any) =>
  defHttp.get<ExercisePrescription>({ url: adminPath + '/physical/exercisePrescription/list', params });

export const exercisePrescriptionListData = (params?: ExercisePrescription | any) =>
  defHttp.post<Page<ExercisePrescription>>({ url: adminPath + '/physical/exercisePrescription/findListData', params });

export const exercisePrescriptionEditSort = (params?: ExercisePrescription | any) =>
  defHttp.post<Page<ExercisePrescription>>({ url: adminPath + '/physical/exercisePrescription/editSort', params });

export const exercisePrescriptionForm = (params?: ExercisePrescription | any) =>
  defHttp.get<ExercisePrescription>({ url: adminPath + '/physical/exercisePrescription/form', params });

export const exercisePrescriptionSave = (params?: any, data?: ExercisePrescription | any) =>
  defHttp.postJson<ExercisePrescription>({ url: adminPath + '/physical/exercisePrescription/save', params, data });

export const exercisePrescriptionDelete = (params?: ExercisePrescription | any) =>
  defHttp.get<ExercisePrescription>({ url: adminPath + '/physical/exercisePrescription/delete', params });
